package com.itheima.service.db.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.domain.db.SoulDimension;
import com.itheima.mapper.SoulDimensionMapper;
import com.itheima.service.db.SoulDimensionService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class SoulDimensionServiceImpl implements SoulDimensionService {

    @Autowired
    SoulDimensionMapper soulDimensionMapper;


    @Override
    public List<SoulDimension> findByReportId(Integer reportId) {
        LambdaQueryWrapper<SoulDimension> qw = new LambdaQueryWrapper<>();
        qw.eq(reportId!=null,SoulDimension::getReportId,reportId);
        List<SoulDimension> dimensionList = soulDimensionMapper.selectList(qw);
        return dimensionList;
    }
}
